<template>
    <el-table :data="newOrdersStore0.orderPlans0" style="width: 100%">
        <el-table-column property="ra" label="采收记录批次" />
        <el-table-column property="rb" label="完成采收时间" />
        <el-table-column property="rc" label="采收地块" />
        <el-table-column property="rd" label="采收作物" />
        <el-table-column property="re" label="采收量" />
        <el-table-column property="realname" label="采收人" />
        <el-table-column label="操作">
            <template #default="{ row }">
                <div style="display: flex; flex-direction: column; gap: 8px; align-items: center;">
                    <el-button size="small" style="width: 60px;" @click="emits('check',row)">查看</el-button>
                    <el-button size="small" style="width: 60px;margin-left: 0;" @click="emits('edit', row)">编辑</el-button>
                    <el-button size="small" type="danger" style="width: 60px;margin-left: 0;" @click="handleRemove1(row.id)">删除</el-button>
                </div>
            </template>
        </el-table-column>
    </el-table>
</template>

<script lang='ts' setup>
import type { IUserTableItem1 } from '@/interfaces/IUser';
import router from '@/router'
import RouterMap from '@/router/RouterMap';
import { RouterView } from 'vue-router';

import { useNewOrdersStore0 } from '@/stores/NewOrdersStore';
import { watch } from 'vue';
import type { IOderPlans0 } from '@/stores/NewOrdersStore';
const newOrdersStore0 = useNewOrdersStore0();

watch( () => newOrdersStore0.orderPlans0 , (newVal: IOderPlans0[]) => {
  newOrdersStore0.orderPlans0 = newVal;
  console.log(489798465498498)
},);

const props = defineProps<{ recordData: any[] }>()
console.log(props.recordData)
const emits = defineEmits(['remove', 'edit','check'])
const handleRemove1 = (ra: number) => {
    emits('remove', ra)
}
const Edit = () => {

    router.push('edit');
}
const tc = () => {
    alert('功能开发中')
}
</script>

<style lang='scss' scoped>

.el-button{
    background-color: #1E4D58 !important;
    color: #4BC6C7;
    border: 0;
}
::v-deep(.el-table__body .el-table__row .el-table__cell) {
  background-color: #0F2634!important;
  border: 0;
  color: white;
    border-bottom: none !important;
}
::v-deep(.el-table__header .el-table__cell) {
  background-color: #1D4A56 !important;
  border: 0;
  color: white;
  border-bottom: none !important;
}
::v-deep(div.el-table__inner-wrapper::before) {
  display: none !important;
  border: none !important;
  height: 0 !important;
  background: none !important;
}

</style>